<template>
    <div class="qq-email-config">
        <el-row :gutter="20">
            <el-col :span="12">
                <el-card header="邮件配置" shadow="never">
                    <el-form ref="form" :model="form" label-width="100px">
                        <el-form-item label="邮箱">
                            <el-input v-model="form.email"></el-input>
                        </el-form-item>
                        <el-form-item label="密码">
                            <el-input v-model="form.password" type="password"></el-input>
                        </el-form-item>
                        <el-form-item label="SMTP服务器">
                            <el-input v-model="form.host"></el-input>
                        </el-form-item>
                        <el-form-item label="端口">
                            <el-input v-model="form.port"></el-input>
                        </el-form-item>
                        <el-form-item label="SSL">
                            <el-switch v-model="form.ssl"></el-switch>
                        </el-form-item>
                        <el-form-item>
                            <el-button type="primary">保存配置</el-button>
                        </el-form-item>
                    </el-form>
                </el-card>
            </el-col>
            <el-col :span="12">
                <el-card header="邮件测试" shadow="never">
                    <el-form ref="form" :model="testForm" label-width="100px">
                        <el-form-item label="收件人">
                            <el-input v-model="testForm.recipient"></el-input>
                        </el-form-item>
                        <el-form-item label="主题">
                            <el-input v-model="testForm.subject"></el-input>
                        </el-form-item>
                        <el-form-item label="内容">
                            <el-input v-model="testForm.content"></el-input>
                        </el-form-item>
                        <el-form-item>
                            <el-button type="primary">发送测试邮件</el-button>
                        </el-form-item>
                    </el-form>
                </el-card>
            </el-col>
        </el-row>
    </div>
</template>
<script>
export default {
    name: 'QqEmail',
    data() {
        return {
            form: {
                email: '',
                password: '',
                host: '',
                port: '',
                ssl: false
            },
            testForm: {
                email: '',
                subject: '',
                content: ''
            }
        };
    }
}
</script>